package me.hushuang.webb.back.util;

import java.util.regex.Pattern;

/**
 * 正则表达式匹配
 * Created by hushuang on 2017/4/12.
 */
public class PatternUtils {
    public static boolean simpleMatch(String pattern, String reqUrl) {
        if (reqUrl == null || pattern == null) {
            return false;
        }
        return Pattern.matches(pattern, reqUrl);
    }

    public static void main(String args[]) {
        System.out.println("result:" + simpleMatch(".*\\.sh.*", "https://werewrd.dq.com/asdfasp/adb.sh"));
    }
}
